package com.mt.mtbletools;

import com.mt.mtbletools.R;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;

public class MTSeriFunctionSelectFragment extends Fragment {
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
	}
	
	private View view;
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		if (view != null) {
			return view;
		}

		view = inflater.inflate(R.layout.fragment_mtserifunctionselect, container, false);

		initView();

		return view;
	}
	
	// 初始化控件
	private Button datas_mode;
	private Button cmd_mode;
	private void initView(){
		datas_mode = (Button) view.findViewById(R.id.datas_mode);
		cmd_mode = (Button) view.findViewById(R.id.cmd_mode);
		
		datas_mode.setOnClickListener(myOnClickListener);
		cmd_mode.setOnClickListener(myOnClickListener);
	}
	
	private OnClickListener myOnClickListener = new OnClickListener() {
		
		@Override
		public void onClick(View v) {
			if(v == datas_mode){
				gotoDatasPage();
				return;
			}
			
			if(v == cmd_mode){
				gotoCmdPage();
				return;
			}
			
		}
	};
	
	protected void gotoDatasPage() {
		
	}
	protected void gotoCmdPage() {
		
	}
}
